home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / asppw112 / fileuplo.asp < prev    next >
Encoding:
Text File  |  1998-12-21  |  3.2 KB  |  89 lines

  1.  
  2. <%
  3.     ' This file is provided as part of  ASP Power Widgets Samples
  4.     '
  5.     ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
  6.     ' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
  7.     ' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
  8.     ' OF MERCHANTABILITY AND/OR FITNESS FOR A  PARTICULAR
  9.     ' PURPOSE.
  10.  
  11.     ' Copyright 1997-1998. All rights reserved.
  12.     ' Dalun Software Inc. ASP Power Widgets
  13.     ' http://www.dalun.com
  14.     ' http://members.tripod.com/ActiveServerPage/
  15.  
  16.     'You may have to change some parameters to run this asp file.
  17.     'In this demo fileupload.exe and fileupload.ini are put in the virtural
  18.     'directory of "/cgi-bin/".
  19.  
  20.     'Please review fileupload.ini and update some parameters
  21.     'accordingly.
  22.  
  23.     'Cookie "FileUpload/intel-mmx-166" is used to exclude illegle uploading.
  24.  
  25.     'In this sample files will be uploaded to C:\ResearchDept\Andrew.
  26.     'You can generate a different path for different users
  27.     'in your own application.
  28.  
  29.     'please email dalunj@hotmail.com to register for better service and support.
  30.     'We will invoice your company.
  31.  
  32.     'This cookie name and value should be same as that in fileupload.ini.
  33.     'This cookie is used by fileupload.exe
  34.     Response.Cookies("FileUpload") = "intel-mmx-166"
  35.     Response.Cookies("FileUpload").Path = "/"
  36.  
  37.     'Don't change this cookie name, just change the cookie value accordingly.
  38.     'This cookie is used by fileupload.exe
  39.     Response.Cookies("FileUploadToWhere") = "c:\ResearchDept\Andrew\"   'Change it!!!
  40.     Response.Cookies("FileUploadToWhere").Path = "/"
  41.  
  42.     'Don't change this cookie name, but you can change the value or simply remove this cookie.
  43.     'This cookie is used by fileupload.exe
  44.     'If there is no disk quota limit imposted, just set it as "".
  45.     Response.Cookies("UserDiskQuota") = "2000000"   'Change it!!!.
  46.     Response.Cookies("UserDiskQuota").Path = "/"
  47.  
  48.     Response.Cookies("User") = "Andrew"             'Change this accordingly.
  49.     Response.Cookies("User").Path = "/"
  50.  
  51.     'Cookie path:
  52.     'Now the cookie path is "/" , if you get a "cookie missing" error, please
  53.     'Change the cookie path.
  54.  
  55. %>
  56.  
  57. <HTML><BODY>
  58. <center>
  59. <h1>File Upload</h1>
  60. Please select files to upload.<P>
  61.  
  62.      <!--  Change the path "/cgi-bin/" below, if needed  -->
  63.      <!--  Don't Change any other things       -->
  64.  
  65.    <FORM ACTION  ="/cgi-bin/fileUpload.exe"  ENCTYPE ="multipart/form-data" METHOD  ="post">
  66.  
  67. <!--you can specify file names on server
  68.    <FORM ACTION  ="/cgi-bin/fileUpload.exe?ServerName1=abc.gif&ServerName2=abc.jpg"  ENCTYPE ="multipart/form-data" METHOD  ="post">
  69. --->
  70.  
  71.      <!-- You may add more or remove one of the input entries below  -->
  72.      <!-- But you CAN NOT change the input type "FILE" -->
  73.      <!-- You CAN NOT use fnx, flx as any other form item name, where x is a number -->
  74.  
  75.        <INPUT TYPE="FILE" NAME="UploadFile1" SIZE=40><P>
  76.        <INPUT TYPE="FILE" NAME="UploadFile2" SIZE=40><P>
  77.  
  78.        <INPUT TYPE="Hidden" NAME="Palm Top" SIZE=40 value="Cassiopeia's performance is good."><P>
  79.  
  80.      <!-- Above form item "Palm Top" is just used to show you how to pass some values to fileuploaded.asp -->
  81.  
  82.        <INPUT TYPE="SUBMIT" value="Upload">
  83.    </FORM>
  84.  
  85. </BODY></HTML>
  86.  
  87.  
  88.  
  89.